/*
import React from 'react';
import FormItemInput from "antd/lib/form/FormItemInput";
import {Input} from "antd";
import BraftEditor from "braft-editor";
import SubmitBlog from "../BasicDemo/SubmitBlog/SubmitBlog";
import {apiArticleAdd} from "../../../../../request/ArticleAxios/ArticleAxios";
import AddAlterSuccess from "../../../../../utils/tools/AntdAlter/AddAlter/AddAlterSuccess";
import AddAlterFailure from "../../../../../utils/tools/AntdAlter/AddAlter/AddAlterFailure";
import {ArticleWithBloBs} from "../../../../../map/Article/ArticleWithBloBs";

let submittblogflag = false;


export function FunctionBasicDemo() {


    const myRef = React.useRef()

    //提示输入的回调
    function show() {
        alert(myRef.current.value)
    }

    const [editorState, outputHTML, setEditorContentAsync,] = React.useState({
        editorState: BraftEditor.createEditorState('<p>Hello <b>World!</b></p>'), // 设置编辑器初始内容
        outputHTML: '<p>111</p>'
    })
    let [isLivinig] = React.useState(false)
    /!* const {editorState, outputHTML} = this.state*!/

    const formItemLayout = {

        labelCol: {span: 4},  // 左边留白大小
        wrapperCol: {span: 23}, // 内容区大小（两者和不能!>24）
    };


    React.useEffect(() => {
        let timer = setInterval(() => {
            isLivinig = true
            // 3秒后更改编辑器内容
            setTimeout(setEditorContentAsync, 3000)
        }, 1000)
        return () => {
            clearInterval(timer)
        }
    }, [])

    function clickAddArticle() {
        //https://blog.csdn.net/weixin_30416871/article/details/94885711
        const {outputHTML} = this.state
        var article = ArticleWithBloBs;
        article.outputhtml = outputHTML;
        article.love = "2";
        apiArticleAdd(article).then(() => AddAlterSuccess()).catch(
            () => AddAlterFailure
        )


    }

    /!*方法在这里创建*!/
    React.useEffect(
        () => clickAddArticle()
    )

    return (

        <div>

            <div>
                <FormItemInput {...formItemLayout} label="文章标题">
                    {(
                        <Input size="large" placeholder="请输入标题"/>
                    )}
                </FormItemInput>
                <div className="editor-wrapper">
                    <BraftEditor
                        value={editorState}

                    />
                </div>

                <SubmitBlog submitflag={submittblogflag} parentAddArticle={this.clickAddArticle}/>
                <h5>输出内容</h5>
                <div className="output-content">{outputHTML}</div>
            </div>

        </div>
    )
}


*/
